package yl.hs.bmipfull.controllers.laboratory;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import yl.hs.bmipfull.controllers.ControllerBase;
import yl.hs.bmipfull.service.laboratory.ILaboratorySystemLogService;
import yl.hs.bmipfull.viewmodels.WebResult;

@Api(value = "日志信息Web接口", tags = "实验室管理——日志信息操作")
@RequestMapping(value = "/api/laboratory/log")
@RestController
public class LaboratorySystemLogController extends ControllerBase {
    @Autowired
    ILaboratorySystemLogService service;

    @ApiOperation(value = "查询包装信息", notes = "查询包装信息")
    @RequestMapping(value = "/{dataSN}", method = RequestMethod.GET)
    public WebResult queryList(@ApiParam(value = "数据编号") @PathVariable String dataSN) {
        try {
            return success("查询成功", service.queryListByDataSNAndActionType(dataSN));
        } catch (Exception e) {
            return error(e);
        }
    }
}
